
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Introduction to atomman: Settings and Library &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Introduction to atomman: LAMMPS functionality" href="2._LAMMPS_functionality.html" />
    <link rel="prev" title="Introduction to atomman: DFT reference crystal loading" href="1.4.12._DFT_reference_crystal_loading.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="2._LAMMPS_functionality.html" title="Introduction to atomman: LAMMPS functionality"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="1.4.12._DFT_reference_crystal_loading.html" title="Introduction to atomman: DFT reference crystal loading"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  
<style>
/* CSS for nbsphinx extension */

/* remove conflicting styling from Sphinx themes */
div.nbinput.container div.prompt *,
div.nboutput.container div.prompt *,
div.nbinput.container div.input_area pre,
div.nboutput.container div.output_area pre,
div.nbinput.container div.input_area .highlight,
div.nboutput.container div.output_area .highlight {
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

div.nbinput.container > div[class*=highlight],
div.nboutput.container > div[class*=highlight] {
    margin: 0;
}

div.nbinput.container div.prompt *,
div.nboutput.container div.prompt * {
    background: none;
}

div.nboutput.container div.output_area .highlight,
div.nboutput.container div.output_area pre {
    background: unset;
}

div.nboutput.container div.output_area div.highlight {
    color: unset;  /* override Pygments text color */
}

/* avoid gaps between output lines */
div.nboutput.container div[class*=highlight] pre {
    line-height: normal;
}

/* input/output containers */
div.nbinput.container,
div.nboutput.container {
    display: -webkit-flex;
    display: flex;
    align-items: flex-start;
    margin: 0;
    width: 100%;
}
@media (max-width: 540px) {
    div.nbinput.container,
    div.nboutput.container {
        flex-direction: column;
    }
}

/* input container */
div.nbinput.container {
    padding-top: 5px;
}

/* last container */
div.nblast.container {
    padding-bottom: 5px;
}

/* input prompt */
div.nbinput.container div.prompt pre {
    color: #307FC1;
}

/* output prompt */
div.nboutput.container div.prompt pre {
    color: #BF5B3D;
}

/* all prompts */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
    width: 4.5ex;
    padding-top: 5px;
    position: relative;
    user-select: none;
}

div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
    position: absolute;
    right: 0;
    margin-right: 0.3ex;
}

@media (max-width: 540px) {
    div.nbinput.container div.prompt,
    div.nboutput.container div.prompt {
        width: unset;
        text-align: left;
        padding: 0.4em;
    }
    div.nboutput.container div.prompt.empty {
        padding: 0;
    }

    div.nbinput.container div.prompt > div,
    div.nboutput.container div.prompt > div {
        position: unset;
    }
}

/* disable scrollbars on prompts */
div.nbinput.container div.prompt pre,
div.nboutput.container div.prompt pre {
    overflow: hidden;
}

/* input/output area */
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
    -webkit-flex: 1;
    flex: 1;
    overflow: auto;
}
@media (max-width: 540px) {
    div.nbinput.container div.input_area,
    div.nboutput.container div.output_area {
        width: 100%;
    }
}

/* input area */
div.nbinput.container div.input_area {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    /*background: #f5f5f5;*/
}

/* override MathJax center alignment in output cells */
div.nboutput.container div[class*=MathJax] {
    text-align: left !important;
}

/* override sphinx.ext.imgmath center alignment in output cells */
div.nboutput.container div.math p {
    text-align: left;
}

/* standard error */
div.nboutput.container div.output_area.stderr {
    background: #fdd;
}

/* ANSI colors */
.ansi-black-fg { color: #3E424D; }
.ansi-black-bg { background-color: #3E424D; }
.ansi-black-intense-fg { color: #282C36; }
.ansi-black-intense-bg { background-color: #282C36; }
.ansi-red-fg { color: #E75C58; }
.ansi-red-bg { background-color: #E75C58; }
.ansi-red-intense-fg { color: #B22B31; }
.ansi-red-intense-bg { background-color: #B22B31; }
.ansi-green-fg { color: #00A250; }
.ansi-green-bg { background-color: #00A250; }
.ansi-green-intense-fg { color: #007427; }
.ansi-green-intense-bg { background-color: #007427; }
.ansi-yellow-fg { color: #DDB62B; }
.ansi-yellow-bg { background-color: #DDB62B; }
.ansi-yellow-intense-fg { color: #B27D12; }
.ansi-yellow-intense-bg { background-color: #B27D12; }
.ansi-blue-fg { color: #208FFB; }
.ansi-blue-bg { background-color: #208FFB; }
.ansi-blue-intense-fg { color: #0065CA; }
.ansi-blue-intense-bg { background-color: #0065CA; }
.ansi-magenta-fg { color: #D160C4; }
.ansi-magenta-bg { background-color: #D160C4; }
.ansi-magenta-intense-fg { color: #A03196; }
.ansi-magenta-intense-bg { background-color: #A03196; }
.ansi-cyan-fg { color: #60C6C8; }
.ansi-cyan-bg { background-color: #60C6C8; }
.ansi-cyan-intense-fg { color: #258F8F; }
.ansi-cyan-intense-bg { background-color: #258F8F; }
.ansi-white-fg { color: #C5C1B4; }
.ansi-white-bg { background-color: #C5C1B4; }
.ansi-white-intense-fg { color: #A1A6B2; }
.ansi-white-intense-bg { background-color: #A1A6B2; }

.ansi-default-inverse-fg { color: #FFFFFF; }
.ansi-default-inverse-bg { background-color: #000000; }

.ansi-bold { font-weight: bold; }
.ansi-underline { text-decoration: underline; }


div.nbinput.container div.input_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight].math,
div.nboutput.container div.output_area.rendered_html,
div.nboutput.container div.output_area > div.output_javascript,
div.nboutput.container div.output_area:not(.rendered_html) > img{
    padding: 5px;
    margin: 0;
}

/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
div.nbinput.container div.input_area > div[class^='highlight'],
div.nboutput.container div.output_area > div[class^='highlight']{
    overflow-y: hidden;
}

/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
.prompt a.copybtn {
    display: none;
}

/* Some additional styling taken form the Jupyter notebook CSS */
div.rendered_html table {
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  color: black;
  font-size: 12px;
  table-layout: fixed;
}
div.rendered_html thead {
  border-bottom: 1px solid black;
  vertical-align: bottom;
}
div.rendered_html tr,
div.rendered_html th,
div.rendered_html td {
  text-align: right;
  vertical-align: middle;
  padding: 0.5em 0.5em;
  line-height: normal;
  white-space: normal;
  max-width: none;
  border: none;
}
div.rendered_html th {
  font-weight: bold;
}
div.rendered_html tbody tr:nth-child(odd) {
  background: #f5f5f5;
}
div.rendered_html tbody tr:hover {
  background: rgba(66, 165, 245, 0.2);
}
</style>
<div class="section" id="Introduction-to-atomman:-Settings-and-Library">
<h1>Introduction to atomman: Settings and Library<a class="headerlink" href="#Introduction-to-atomman:-Settings-and-Library" title="Permalink to this headline">¶</a></h1>
<p><strong>Lucas M. Hale</strong>, <a class="reference external" href="mailto:lucas&#46;hale&#37;&#52;&#48;nist&#46;gov?Subject=ipr-demo">lucas<span>&#46;</span>hale<span>&#64;</span>nist<span>&#46;</span>gov</a>, <em>Materials Science and Engineering Division, NIST</em>.</p>
<p><a class="reference external" href="http://www.nist.gov/public_affairs/disclaimer.cfm">Disclaimers</a></p>
<div class="section" id="1.-Introduction">
<h2>1. Introduction<a class="headerlink" href="#1.-Introduction" title="Permalink to this headline">¶</a></h2>
<p>The atomman package extends the settings and Database tools provided by the <a class="reference external" href="https://github.com/usnistgov/potentials">potentials package</a>. The settings options allow for the default values of certain parameters to be changed and saved for later sessions. Database provides a single class for interacting with records in the NIST Interatomic Potentials Repository’s database.</p>
<p><em>Updated version 1.4.0</em>: Major changes in the settings and library behavior due to potentials version 0.3.0.</p>
<p><strong>Library Imports</strong></p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Standard libraries</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="k">import</span> <span class="n">Path</span>
<span class="kn">import</span> <span class="nn">datetime</span>

<span class="c1"># https://github.com/usnistgov/atomman</span>
<span class="kn">import</span> <span class="nn">atomman</span> <span class="k">as</span> <span class="nn">am</span>

<span class="c1"># Show atomman version</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;atomman version =&#39;</span><span class="p">,</span> <span class="n">am</span><span class="o">.</span><span class="n">__version__</span><span class="p">)</span>

<span class="c1"># Show date of Notebook execution</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Notebook executed on&#39;</span><span class="p">,</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">())</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
atomman version = 1.4.0
Notebook executed on 2021-08-04
</pre></div></div>
</div>
</div>
<div class="section" id="2.-Settings">
<h2>2. Settings<a class="headerlink" href="#2.-Settings" title="Permalink to this headline">¶</a></h2>
<p>Many optional settings can be set and saved for later sessions using atomman.settings. The settings in atomman are identical to those found in <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/3.%20Change%20Default%20Settings.html">potentials.settings</a> meaning that changing the settings in either package will affect the behavior of the other. See the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/3.%20Change%20Default%20Settings.html">potentials.settings</a> documentation for
more details.</p>
</div>
<div class="section" id="3.-Database-interface">
<h2>3. Database interface<a class="headerlink" href="#3.-Database-interface" title="Permalink to this headline">¶</a></h2>
<p>The atomman.library.Database class extends <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database</a> to provide support for crystal structure references in addition to the potentials references. The Database class is used by atomman.load() for <a class="reference external" href="1.4.10._prototype_loading.html">‘prototype’</a>, <a class="reference external" href="1.4.11._crystal_loading.html">‘crystal’</a> and <a class="reference external" href="1.4.12._DFT_reference_crystal_loading.html">‘dft_reference’</a> styles and by
<a class="reference external" href="2.1._Potential_class.html">atomman.load_lammps_potential</a>. It can also be directly accessed and used to explore the database for more involved investigations.</p>
<p>See the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a> for information about initializing a Database object and the generic record query methods.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Load a Database with default settings</span>
<span class="n">potdb</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">library</span><span class="o">.</span><span class="n">Database</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="3.1.-Crystal-prototypes">
<h3>3.1. Crystal prototypes<a class="headerlink" href="#3.1.-Crystal-prototypes" title="Permalink to this headline">¶</a></h3>
<p>Crystal prototype records provide atomic coordinates for a crystal prototype, i.e. a combination of space group and lattice sites without any species-specific information.</p>
<div class="section" id="3.1.1.-get_crystal_prototypes,-get_crystal_prototype,-and-download_crystal_prototypes">
<h4>3.1.1. get_crystal_prototypes, get_crystal_prototype, and download_crystal_prototypes<a class="headerlink" href="#3.1.1.-get_crystal_prototypes,-get_crystal_prototype,-and-download_crystal_prototypes" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>id</strong> (<em>str or list, optional</em>) Prototype ID(s) to search for. These are unique identifiers for each prototype based on comm.</p></li>
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>commonname</strong> (<em>str or list, optional</em>) Common name(s) to limit the search by.</p></li>
<li><p><strong>prototype</strong> (<em>str or list, optional</em>) Prototype identifying composition(s) to limit the search by.</p></li>
<li><p><strong>pearson</strong> (<em>str or list, optional</em>) The Pearson symbol(s) to limit the search by.</p></li>
<li><p><strong>strukturbericht</strong> (<em>str or list, optional</em>) The strukturbericht identifier(s) to limit the search by.</p></li>
<li><p><strong>sg_number</strong> (<em>int or list, optional</em>) The space group number(s) to limit the search by.</p></li>
<li><p><strong>sg_hm</strong> (<em>str or list, optional</em>) The space group Hermann-Maguin identifier(s) to limit the search by.</p></li>
<li><p><strong>sg_schoenflies</strong> (<em>str or list, optional</em>) The space group Schoenflies identifier(s) to limit the search by.</p></li>
<li><p><strong>crystalfamily</strong> (<em>str, optional</em>) The crystal system family to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">prototypes</span><span class="p">,</span> <span class="n">prototypes_df</span> <span class="o">=</span> <span class="n">potdb</span><span class="o">.</span><span class="n">get_crystal_prototypes</span><span class="p">(</span><span class="n">return_df</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">prototypes_df</span>
</pre></div>
</div>
</div>
<div class="nboutput docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Found 19 matching crystal_prototype records in local library
Found 19 matching crystal_prototype records in remote library
 - 0 remote records are new
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="output_area rendered_html docutils container">
<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>name</th>
      <th>key</th>
      <th>id</th>
      <th>commonname</th>
      <th>prototype</th>
      <th>pearson</th>
      <th>strukturbericht</th>
      <th>sg_number</th>
      <th>sg_hm</th>
      <th>sg_schoenflies</th>
      <th>crystalfamily</th>
      <th>natypes</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>A1--Cu--fcc</td>
      <td>d30980ad-ae18-425d-84cb-abf08577bdc8</td>
      <td>A1--Cu--fcc</td>
      <td>face-centered cubic</td>
      <td>Cu</td>
      <td>cF4</td>
      <td>A1</td>
      <td>225</td>
      <td>F m -3 m</td>
      <td>Oh^5</td>
      <td>cubic</td>
      <td>1</td>
    </tr>
    <tr>
      <td>1</td>
      <td>A15--Cr3Si</td>
      <td>f4101896-1e17-4736-a4d1-308b8934e8ce</td>
      <td>A15--Cr3Si</td>
      <td>beta-tungsten</td>
      <td>Cr3Si</td>
      <td>cP8</td>
      <td>A15</td>
      <td>223</td>
      <td>P m -3 n</td>
      <td>Oh^3</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>2</td>
      <td>A15--beta-W</td>
      <td>e0126715-c7db-4d79-be80-707c572bebd6</td>
      <td>A15--beta-W</td>
      <td>beta-tungsten</td>
      <td>b-W</td>
      <td>cP8</td>
      <td>A15</td>
      <td>223</td>
      <td>P m -3 n</td>
      <td>Oh^3</td>
      <td>cubic</td>
      <td>1</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A2--W--bcc</td>
      <td>bc13827d-e1e6-4d70-8c3a-59399ad78b0f</td>
      <td>A2--W--bcc</td>
      <td>body-centered cubic</td>
      <td>W</td>
      <td>cI2</td>
      <td>A2</td>
      <td>229</td>
      <td>I m -3 m</td>
      <td>Oh^9</td>
      <td>cubic</td>
      <td>1</td>
    </tr>
    <tr>
      <td>4</td>
      <td>A3'--alpha-La--double-hcp</td>
      <td>154d1a2b-04da-4477-8962-a0ca0c17c8fc</td>
      <td>A3'--alpha-La--double-hcp</td>
      <td>double hcp</td>
      <td>La</td>
      <td>hP4</td>
      <td>A3'</td>
      <td>194</td>
      <td>P 6_3/m m c</td>
      <td>D6h^4</td>
      <td>hexagonal</td>
      <td>1</td>
    </tr>
    <tr>
      <td>5</td>
      <td>A3--Mg--hcp</td>
      <td>4dab7fbb-108a-425e-8adb-d55de7b1134b</td>
      <td>A3--Mg--hcp</td>
      <td>hexagonal close-packed</td>
      <td>Mg</td>
      <td>hP2</td>
      <td>A3</td>
      <td>194</td>
      <td>P 6_3/m m c</td>
      <td>D6h^4</td>
      <td>hexagonal</td>
      <td>1</td>
    </tr>
    <tr>
      <td>6</td>
      <td>A4--C--dc</td>
      <td>12654c83-c153-4b58-8805-f6dce43b7842</td>
      <td>A4--C--dc</td>
      <td>diamond cubic</td>
      <td>C</td>
      <td>cF8</td>
      <td>A4</td>
      <td>227</td>
      <td>F d -3 m</td>
      <td>Oh^7</td>
      <td>cubic</td>
      <td>1</td>
    </tr>
    <tr>
      <td>7</td>
      <td>A5--beta-Sn</td>
      <td>821526c5-561e-4f09-8a04-680419dc1495</td>
      <td>A5--beta-Sn</td>
      <td>white tin</td>
      <td>b-Sn</td>
      <td>tI4</td>
      <td>A5</td>
      <td>141</td>
      <td>I 4_1/a m d</td>
      <td>D4h^19</td>
      <td>tetragonal</td>
      <td>1</td>
    </tr>
    <tr>
      <td>8</td>
      <td>A6--In--bct</td>
      <td>76cbf2c1-fa86-41c4-85ae-c24f55c9f13a</td>
      <td>A6--In--bct</td>
      <td>body-centered tetragonal</td>
      <td>In</td>
      <td>tI2</td>
      <td>A6</td>
      <td>139</td>
      <td>I 4/m m m</td>
      <td>D4h^17</td>
      <td>tetragonal</td>
      <td>1</td>
    </tr>
    <tr>
      <td>9</td>
      <td>A7--alpha-As</td>
      <td>c1e15cf8-6998-40ce-afbd-0b1cb6271a1f</td>
      <td>A7--alpha-As</td>
      <td>alpha As</td>
      <td>a-As</td>
      <td>hR6</td>
      <td>A7</td>
      <td>166</td>
      <td>R -3 m</td>
      <td>D3d^5</td>
      <td>hexagonal</td>
      <td>1</td>
    </tr>
    <tr>
      <td>10</td>
      <td>Ah--alpha-Po--sc</td>
      <td>ceb6d7cc-b20e-4878-8b2b-1e62185d16af</td>
      <td>Ah--alpha-Po--sc</td>
      <td>simple cubic</td>
      <td>a-Po</td>
      <td>cP1</td>
      <td>Ah</td>
      <td>221</td>
      <td>P m -3 m</td>
      <td>Oh^1</td>
      <td>cubic</td>
      <td>1</td>
    </tr>
    <tr>
      <td>11</td>
      <td>B1--NaCl--rock-salt</td>
      <td>133ca871-c927-4073-ae46-b8a27e035f4b</td>
      <td>B1--NaCl--rock-salt</td>
      <td>rock salt</td>
      <td>NaCl</td>
      <td>cF8</td>
      <td>B1</td>
      <td>225</td>
      <td>F m -3 m</td>
      <td>Oh^5</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>12</td>
      <td>B2--CsCl</td>
      <td>7398b231-fd55-4378-b6b2-6607262d3090</td>
      <td>B2--CsCl</td>
      <td>cesium chloride</td>
      <td>CsCl</td>
      <td>cP2</td>
      <td>B2</td>
      <td>221</td>
      <td>P m -3 m</td>
      <td>Oh^1</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>13</td>
      <td>B3--ZnS--cubic-zinc-blende</td>
      <td>ce517a32-6bca-47d0-82a2-2ee48956cff9</td>
      <td>B3--ZnS--cubic-zinc-blende</td>
      <td>cubic zinc-blende</td>
      <td>c-ZnS</td>
      <td>cF8</td>
      <td>B3</td>
      <td>216</td>
      <td>F -4 3 m</td>
      <td>Td^2</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>14</td>
      <td>C1--CaF2--fluorite</td>
      <td>74171ba0-6605-4956-b8d5-0059672ee7e2</td>
      <td>C1--CaF2--fluorite</td>
      <td>fluorite</td>
      <td>CaF2</td>
      <td>cF12</td>
      <td>C1</td>
      <td>225</td>
      <td>F m -3 m</td>
      <td>Oh^5</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>15</td>
      <td>D0_3--BiF3</td>
      <td>8a2eb4b8-1302-46d9-992d-4296c227d966</td>
      <td>D0_3--BiF3</td>
      <td>BiF3</td>
      <td>BiF3</td>
      <td>cF16</td>
      <td>D0_3</td>
      <td>225</td>
      <td>F m -3 m</td>
      <td>Oh^5</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>16</td>
      <td>L1_0--AuCu</td>
      <td>f7b8d5d9-b0eb-401a-9cc3-038170e3ac1c</td>
      <td>L1_0--AuCu</td>
      <td>AuCu</td>
      <td>AuCu</td>
      <td>tP2</td>
      <td>L1_0</td>
      <td>123</td>
      <td>P 4/m m m</td>
      <td>D4h^1</td>
      <td>tetragonal</td>
      <td>2</td>
    </tr>
    <tr>
      <td>17</td>
      <td>L1_2--AuCu3</td>
      <td>942ce385-85ab-4cb9-8adc-4bdaaf145831</td>
      <td>L1_2--AuCu3</td>
      <td>AuCu3</td>
      <td>AuCu3</td>
      <td>cP4</td>
      <td>L1_2</td>
      <td>221</td>
      <td>P m -3 m</td>
      <td>Oh^1</td>
      <td>cubic</td>
      <td>2</td>
    </tr>
    <tr>
      <td>18</td>
      <td>L2_1--AlCu2Mn--heusler</td>
      <td>0fb6d590-5ce5-4476-a1bf-7130f96f2af1</td>
      <td>L2_1--AlCu2Mn--heusler</td>
      <td>heusler</td>
      <td>AlCu2Mn</td>
      <td>cF16</td>
      <td>L2_1</td>
      <td>225</td>
      <td>F m -3 m</td>
      <td>Oh^5</td>
      <td>cubic</td>
      <td>3</td>
    </tr>
  </tbody>
</table>
</div></div>
</div>
</div>
<div class="section" id="3.1.2.-CrystalPrototype-objects">
<h4>3.1.2. CrystalPrototype objects<a class="headerlink" href="#3.1.2.-CrystalPrototype-objects" title="Permalink to this headline">¶</a></h4>
<p>The CrystalPrototype Record objects is a subclass of <a class="reference external" href="https://github.com/usnistgov/potentials/blob/master/doc/5.%20Record%20Classes.html">potentials.Record</a>, and therefore features all of the common Record attributes and methods. CrystalPrototype additionally has attributes for each of the query term listed above, and ucell, which returns the unit cell of the prototype as an atomman.System. Note that the ucell lacks symbol information and the a lattice parameter is by default set to 1.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">prototype</span> <span class="o">=</span> <span class="n">prototypes</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>

<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">id</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;key&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;commonname&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">commonname</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;prototype&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">prototype</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;pearson&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">pearson</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;strukturbericht&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">strukturbericht</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;sg_number&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_number</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;sg_hm&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_hm</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;sg_schoenflies&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_schoenflies</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;crystalfamily&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">crystalfamily</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;natypes&#39;</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">natypes</span><span class="p">)</span>
<span class="nb">print</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;ucell:&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">prototype</span><span class="o">.</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
name A4--C--dc
id A4--C--dc
key 12654c83-c153-4b58-8805-f6dce43b7842
commonname diamond cubic
prototype C
pearson cF8
strukturbericht A4
sg_number 227
sg_hm F d -3 m
sg_schoenflies Oh^7
crystalfamily cubic
natypes 1

ucell:
avect =  [ 1.000,  0.000,  0.000]
bvect =  [ 0.000,  1.000,  0.000]
cvect =  [ 0.000,  0.000,  1.000]
origin = [ 0.000,  0.000,  0.000]
natoms = 8
natypes = 1
symbols = (None,)
pbc = [ True  True  True]
per-atom properties = [&#39;atype&#39;, &#39;pos&#39;]
     id |   atype |  pos[0] |  pos[1] |  pos[2]
      0 |       1 |   0.000 |   0.000 |   0.000
      1 |       1 |   0.500 |   0.500 |   0.000
      2 |       1 |   0.500 |   0.000 |   0.500
      3 |       1 |   0.000 |   0.500 |   0.500
      4 |       1 |   0.250 |   0.250 |   0.250
      5 |       1 |   0.250 |   0.750 |   0.750
      6 |       1 |   0.750 |   0.250 |   0.750
      7 |       1 |   0.750 |   0.750 |   0.250
</pre></div></div>
</div>
</div>
</div>
<div class="section" id="3.2.-Relaxed-crystals">
<h3>3.2. Relaxed crystals<a class="headerlink" href="#3.2.-Relaxed-crystals" title="Permalink to this headline">¶</a></h3>
<p>RelaxedCrystal records provide crystal structure information obtained by relaxing crystal prototypes and DFT reference structures using the different potentials in the NIST Interatomic Potentials Repository at 0 K. If you are working with a particular interatomic potential, this provides a convenient means to obtain the already relaxed crystal structure for that potential.</p>
<div class="section" id="3.2.1.-get_relaxed_crystals,-get_relaxed_crystal-and-download_relaxed_crystals">
<h4>3.2.1. get_relaxed_crystals, get_relaxed_crystal and download_relaxed_crystals<a class="headerlink" href="#3.2.1.-get_relaxed_crystals,-get_relaxed_crystal-and-download_relaxed_crystals" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>method</strong> (<em>str or list or None, optional</em>) The relaxation method used. Allowed values are dynamic, static and box. Default value is dynamic (the most rigorous relaxation method). All will be loaded if set to None.</p></li>
<li><p><strong>standing</strong> (<em>str or list or None, optional</em>) “good” records are the unique crystals found with the most rigorous relaxation, and with known prototypes over DFT structures. “bad” are records filtered out, usually for being duplicates. Default value is “good”. All will be loaded if set to None.</p></li>
<li><p><strong>family</strong> (<em>str or atomman.library.CrystalPrototype or list, optional</em>) The crystal family associated with the relaxed crystal - either crystal prototype name or MP/OQMD database entry name.</p></li>
<li><p><strong>parent_key</strong> (<em>str or list, optional</em>) The UUID4 key(s) assigned to the calculation that the record is based on.</p></li>
<li><p><strong>potential_LAMMPS_id</strong> (<em>str or list, optional</em>) The id for a LAMMPS implemented potential to limit the search by.</p></li>
<li><p><strong>potential_LAMMPS_key</strong> (<em>str or list, optional</em>) The UUID4 for a LAMMPS implemented potential to limit the search by.</p></li>
<li><p><strong>potential_id</strong> (<em>str or list, optional</em>) The id for a potential to limit the search by.</p></li>
<li><p><strong>potential_key</strong> (<em>str or list, optional</em>) The UUID4 for a potential to limit the search by.</p></li>
<li><p><strong>symbols</strong> (<em>str or list, optional</em>) Element symbols in the crystal to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int or list, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
<li><p><strong>natoms</strong> (<em>int or list, optional</em>) The number of unique atoms in the crystal’s unit cell to limit the search by.</p></li>
</ul>
<p><strong>NOTE #1:</strong> The default values of method and standing greatly limit the records being searched. The dynamic relaxation method is the most rigorous, but it also seems to occasionally predict some expected stable structures, like hcp, to transform to unstable structures. In that case, changing the value of method may provide the results you are looking for. <strong>NOTE #2:</strong> The large number of relaxed_crystal records in the database means that some searches can be very slow. It is recommended to
always make the initial search as specific as possible.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Fetch all records for fcc gold</span>
<span class="n">fcc_gold</span><span class="p">,</span> <span class="n">fcc_gold_df</span> <span class="o">=</span> <span class="n">potdb</span><span class="o">.</span><span class="n">get_relaxed_crystals</span><span class="p">(</span><span class="n">family</span><span class="o">=</span><span class="s1">&#39;A1--Cu--fcc&#39;</span><span class="p">,</span> <span class="n">symbols</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;Au&#39;</span><span class="p">],</span> <span class="n">return_df</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

<span class="n">fcc_gold_df</span><span class="o">.</span><span class="n">sort_values</span><span class="p">(</span><span class="s1">&#39;cohesive_energy&#39;</span><span class="p">)[[</span><span class="s1">&#39;potential_LAMMPS_id&#39;</span><span class="p">,</span> <span class="s1">&#39;a&#39;</span><span class="p">,</span> <span class="s1">&#39;cohesive_energy&#39;</span><span class="p">]]</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
</pre></div>
</div>
<div class="output_area rendered_html docutils container">
<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }

    .dataframe thead th {
        text-align: right;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>potential_LAMMPS_id</th>
      <th>a</th>
      <th>cohesive_energy</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>13</td>
      <td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
      <td>4.068501</td>
      <td>-4.299363</td>
    </tr>
    <tr>
      <td>21</td>
      <td>2004--Zhou-X-W--Cu-Ag-Au--LAMMPS--ipr2</td>
      <td>4.080053</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>11</td>
      <td>EAM_Dynamo_ZhouJohnsonWadley_2004NISTretabulat...</td>
      <td>4.080054</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>16</td>
      <td>EAM_Dynamo_ZhouWadleyJohnson_2001NISTretabulat...</td>
      <td>4.080053</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>26</td>
      <td>2004--Zhou-X-W--Au--LAMMPS--ipr2</td>
      <td>4.080053</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>34</td>
      <td>2004--Zhou-X-W--Cu-Ag-Au--LAMMPS--ipr1</td>
      <td>4.080063</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>3</td>
      <td>EAM_Dynamo_ZhouJohnsonWadley_2004_Au__MO_46840...</td>
      <td>4.079787</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>22</td>
      <td>2004--Zhou-X-W--Au--LAMMPS--ipr1</td>
      <td>4.079787</td>
      <td>-3.930005</td>
    </tr>
    <tr>
      <td>30</td>
      <td>EAM_Dynamo_FoilesBaskesDaw_1986Universal3_Au__...</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>23</td>
      <td>1986--Foiles-S-M--Ag-Au-Cu-Ni-Pd-Pt--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>10</td>
      <td>1986--Foiles-S-M--Au--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>29</td>
      <td>EAM_Dynamo_Pun_2017_Au__MO_188701096956_000</td>
      <td>4.077998</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>17</td>
      <td>2017--Purja-Pun-G-P--Au--LAMMPS--ipr1</td>
      <td>4.077998</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>0</td>
      <td>EAM_Dynamo_AdamsFoilesWolfer_1989_Au__MO_08773...</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>27</td>
      <td>1989--Adams-J-B--Au--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>1</td>
      <td>1989--Adams-J-B--Ag-Au-Cu-Ni-Pd-Pt--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.930000</td>
    </tr>
    <tr>
      <td>7</td>
      <td>2005--Grochola-G--Au--LAMMPS--ipr1</td>
      <td>4.070110</td>
      <td>-3.924218</td>
    </tr>
    <tr>
      <td>6</td>
      <td>EAM_Dynamo_GrocholaRusso_2005_Au__MO_557267801...</td>
      <td>4.070110</td>
      <td>-3.924218</td>
    </tr>
    <tr>
      <td>12</td>
      <td>2018--Starikov-S-V--Si-Au--LAMMPS--ipr1</td>
      <td>4.182050</td>
      <td>-3.902447</td>
    </tr>
    <tr>
      <td>35</td>
      <td>2018--Starikov-S-V--Si-Au--LAMMPS--ipr2</td>
      <td>4.182050</td>
      <td>-3.902447</td>
    </tr>
    <tr>
      <td>15</td>
      <td>2020--Starikov-S--Si-Au-Al--LAMMPS--ipr1</td>
      <td>4.149889</td>
      <td>-3.861225</td>
    </tr>
    <tr>
      <td>4</td>
      <td>2010--Olsson-P-A-T--Au--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.810000</td>
    </tr>
    <tr>
      <td>20</td>
      <td>EAM_Dynamo_Olsson_2010_Au__MO_228280943430_000</td>
      <td>4.080000</td>
      <td>-3.810000</td>
    </tr>
    <tr>
      <td>33</td>
      <td>2009--Zhakhovskii-V-V--Au--LAMMPS--ipr2</td>
      <td>4.065000</td>
      <td>-3.810000</td>
    </tr>
    <tr>
      <td>32</td>
      <td>EAM_Dynamo_Zhakhovsky_2009_Au__MO_173248269481...</td>
      <td>4.065000</td>
      <td>-3.810000</td>
    </tr>
    <tr>
      <td>14</td>
      <td>2021--Wang-G--Au-Rh--LAMMPS--ipr1</td>
      <td>4.080000</td>
      <td>-3.810000</td>
    </tr>
    <tr>
      <td>8</td>
      <td>EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_...</td>
      <td>4.056165</td>
      <td>-3.800135</td>
    </tr>
    <tr>
      <td>36</td>
      <td>EMT_Asap_Standard_JacobsenStoltzeNorskov_1996_...</td>
      <td>4.056166</td>
      <td>-3.800135</td>
    </tr>
    <tr>
      <td>2</td>
      <td>EAM_Dynamo_Ackland_1987_Au__MO_754413982908_000</td>
      <td>4.078000</td>
      <td>-3.789045</td>
    </tr>
    <tr>
      <td>9</td>
      <td>EAM_Dynamo_AcklandTichyVitek_1987_Au__MO_10489...</td>
      <td>4.078000</td>
      <td>-3.789045</td>
    </tr>
    <tr>
      <td>25</td>
      <td>1987--Ackland-G-J--Au--LAMMPS--ipr2</td>
      <td>4.078001</td>
      <td>-3.789045</td>
    </tr>
    <tr>
      <td>24</td>
      <td>1987--Ackland-G-J--Au--LAMMPS--ipr1</td>
      <td>4.078001</td>
      <td>-3.789045</td>
    </tr>
    <tr>
      <td>19</td>
      <td>EAM_Dynamo_OBrienBarrPrice_2018_PtAu__MO_94683...</td>
      <td>4.152944</td>
      <td>-3.033205</td>
    </tr>
    <tr>
      <td>18</td>
      <td>2017--OBrien-C-J--Pt-Au--LAMMPS--ipr1</td>
      <td>4.152944</td>
      <td>-3.033205</td>
    </tr>
    <tr>
      <td>28</td>
      <td>2020--Starikov-S--Si-Au-Al--LAMMPS--ipr1</td>
      <td>6.196220</td>
      <td>-1.433837</td>
    </tr>
    <tr>
      <td>5</td>
      <td>2020--Starikov-S--Si-Au-Al--LAMMPS--ipr1</td>
      <td>7.842853</td>
      <td>-0.835714</td>
    </tr>
    <tr>
      <td>31</td>
      <td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
      <td>6.210659</td>
      <td>-0.613333</td>
    </tr>
  </tbody>
</table>
</div></div>
</div>
</div>
<div class="section" id="3.2.2.-RelaxedCrystal-objects">
<h4>3.2.2. RelaxedCrystal objects<a class="headerlink" href="#3.2.2.-RelaxedCrystal-objects" title="Permalink to this headline">¶</a></h4>
<p>Just like CrystalPrototype objects, RelaxedCrystal objects have attributes for all of the query terms plus ucell.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[11]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="nb">print</span><span class="p">(</span><span class="n">fcc_gold</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">potential_LAMMPS_id</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">fcc_gold</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
EAM_Dynamo_AdamsFoilesWolfer_1989_Au__MO_087738844640_000
avect =  [ 4.080,  0.000,  0.000]
bvect =  [ 0.000,  4.080,  0.000]
cvect =  [ 0.000,  0.000,  4.080]
origin = [ 0.000,  0.000,  0.000]
natoms = 4
natypes = 1
symbols = (&#39;Au&#39;,)
pbc = [ True  True  True]
per-atom properties = [&#39;atype&#39;, &#39;pos&#39;]
     id |   atype |  pos[0] |  pos[1] |  pos[2]
      0 |       1 |   0.000 |   0.000 |   0.000
      1 |       1 |   0.000 |   2.040 |   2.040
      2 |       1 |   2.040 |   0.000 |   2.040
      3 |       1 |   2.040 |   2.040 |   0.000
</pre></div></div>
</div>
</div>
</div>
<div class="section" id="3.3.-DFT-reference-crystals">
<h3>3.3. DFT reference crystals<a class="headerlink" href="#3.3.-DFT-reference-crystals" title="Permalink to this headline">¶</a></h3>
<p>Reference crystal structures can also be searched for both within the local/NIST database and within the source databases.</p>
<div class="section" id="3.3.1.-get_reference_crystals,-get_reference_crystal,-download_reference_crystal">
<h4>3.3.1. get_reference_crystals, get_reference_crystal, download_reference_crystal<a class="headerlink" href="#3.3.1.-get_reference_crystals,-get_reference_crystal,-download_reference_crystal" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>id</strong> (<em>str or list, optional</em>) The record id(s) to parse by. For reference crystal records, the id are letters identifying the source database “mp-”, “mvc-”, or “oqmd-”, followed by the source database’s identification number.</p></li>
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>sourcename</strong> (<em>str or list, optional</em>) The full name of source DFT databases to limit the search by. “Materials Project” or “Open Quantum Materials Database”.</p></li>
<li><p><strong>sourcelink</strong> (<em>str or list, optional</em>) The web link of the source DFT databases to limit the search by.</p></li>
<li><p><strong>crystalfamily</strong> (<em>str or list, optional</em>) The crystal system families to limit the search by.</p></li>
<li><p><strong>composition</strong> (<em>str or list, optional</em>) The reduced compositions of the structures to limit the search by. Element symbols are sorted alphabetically.</p></li>
<li><p><strong>symbols</strong> (<em>str or list, optional</em>) Element symbols in the crystal to limit the search by.</p></li>
<li><p><strong>natoms</strong> (<em>int or list, optional</em>) The number of unique atoms in the crystal’s unit cell to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int or list, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
</ul>
<p><strong>NOTE:</strong> These methods only return the reference records that are being stored locally or at potentials.nist.gov and do not search the parent databases.</p>
</div>
<div class="section" id="3.3.2.-fetch_reference_crystal,-fetch_mp_crystals,-fetch_mp_crystal,-fetch_oqmd_crystal">
<h4>3.3.2. fetch_reference_crystal, fetch_mp_crystals, fetch_mp_crystal, fetch_oqmd_crystal<a class="headerlink" href="#3.3.2.-fetch_reference_crystal,-fetch_mp_crystals,-fetch_mp_crystal,-fetch_oqmd_crystal" title="Permalink to this headline">¶</a></h4>
<p>fetch_mp_crystals and fetch_mp_crystal retrieve all or one matching record from the Materials Project based on id. fetch_oqmd_crystal retrieves one record from OQMD based on id.</p>
<p>fetch_reference_crystal first calls get_reference_crystal, and if that fails to find a match, calls either fetch_mp_crystal or fetch_oqmd_crystal based on a given id.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[13]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">api_key</span> <span class="o">=</span> <span class="s1">&#39;C:/Users/lmh1/Documents/Materials Project/API key.txt&#39;</span>
<span class="n">ref</span> <span class="o">=</span> <span class="n">potdb</span><span class="o">.</span><span class="n">fetch_reference_crystal</span><span class="p">(</span><span class="nb">id</span> <span class="o">=</span> <span class="s1">&#39;mp-81&#39;</span><span class="p">,</span> <span class="n">api_key</span><span class="o">=</span><span class="n">api_key</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Crystal retrieved from Materials Project
</pre></div></div>
</div>
</div>
<div class="section" id="3.3.3.-ReferenceCrystal-objects">
<h4>3.3.3. ReferenceCrystal objects<a class="headerlink" href="#3.3.3.-ReferenceCrystal-objects" title="Permalink to this headline">¶</a></h4>
<p>Same as the others, the ReferenceCrystal objects have attributes for the query terms and ucell.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[14]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="nb">print</span><span class="p">(</span><span class="n">ref</span><span class="o">.</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
avect =  [ 4.171,  0.000,  0.000]
bvect =  [ 0.000,  4.171,  0.000]
cvect =  [ 0.000,  0.000,  4.171]
origin = [ 0.000,  0.000,  0.000]
natoms = 4
natypes = 1
symbols = (&#39;Au&#39;,)
pbc = [ True  True  True]
per-atom properties = [&#39;atype&#39;, &#39;pos&#39;]
     id |   atype |  pos[0] |  pos[1] |  pos[2]
      0 |       1 |   0.000 |   0.000 |   0.000
      1 |       1 |   0.000 |   2.086 |   2.086
      2 |       1 |   2.086 |   0.000 |   2.086
      3 |       1 |   2.086 |   2.086 |   0.000
</pre></div></div>
</div>
</div>
<div class="section" id="3.3.4.-save_reference_crystal">
<h4>3.3.4. save_reference_crystal<a class="headerlink" href="#3.3.4.-save_reference_crystal" title="Permalink to this headline">¶</a></h4>
<p>If you fetch a reference crystal from the parent database, you can then save it to the local database using save_reference_crystal.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Introduction to atomman: Settings and Library</a><ul>
<li><a class="reference internal" href="#1.-Introduction">1. Introduction</a></li>
<li><a class="reference internal" href="#2.-Settings">2. Settings</a></li>
<li><a class="reference internal" href="#3.-Database-interface">3. Database interface</a><ul>
<li><a class="reference internal" href="#3.1.-Crystal-prototypes">3.1. Crystal prototypes</a><ul>
<li><a class="reference internal" href="#3.1.1.-get_crystal_prototypes,-get_crystal_prototype,-and-download_crystal_prototypes">3.1.1. get_crystal_prototypes, get_crystal_prototype, and download_crystal_prototypes</a></li>
<li><a class="reference internal" href="#3.1.2.-CrystalPrototype-objects">3.1.2. CrystalPrototype objects</a></li>
</ul>
</li>
<li><a class="reference internal" href="#3.2.-Relaxed-crystals">3.2. Relaxed crystals</a><ul>
<li><a class="reference internal" href="#3.2.1.-get_relaxed_crystals,-get_relaxed_crystal-and-download_relaxed_crystals">3.2.1. get_relaxed_crystals, get_relaxed_crystal and download_relaxed_crystals</a></li>
<li><a class="reference internal" href="#3.2.2.-RelaxedCrystal-objects">3.2.2. RelaxedCrystal objects</a></li>
</ul>
</li>
<li><a class="reference internal" href="#3.3.-DFT-reference-crystals">3.3. DFT reference crystals</a><ul>
<li><a class="reference internal" href="#3.3.1.-get_reference_crystals,-get_reference_crystal,-download_reference_crystal">3.3.1. get_reference_crystals, get_reference_crystal, download_reference_crystal</a></li>
<li><a class="reference internal" href="#3.3.2.-fetch_reference_crystal,-fetch_mp_crystals,-fetch_mp_crystal,-fetch_oqmd_crystal">3.3.2. fetch_reference_crystal, fetch_mp_crystals, fetch_mp_crystal, fetch_oqmd_crystal</a></li>
<li><a class="reference internal" href="#3.3.3.-ReferenceCrystal-objects">3.3.3. ReferenceCrystal objects</a></li>
<li><a class="reference internal" href="#3.3.4.-save_reference_crystal">3.3.4. save_reference_crystal</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="1.4.12._DFT_reference_crystal_loading.html"
                        title="previous chapter">Introduction to atomman: DFT reference crystal loading</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="2._LAMMPS_functionality.html"
                        title="next chapter">Introduction to atomman: LAMMPS functionality</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="2._LAMMPS_functionality.html" title="Introduction to atomman: LAMMPS functionality"
             >next</a> |</li>
        <li class="right" >
          <a href="1.4.12._DFT_reference_crystal_loading.html" title="Introduction to atomman: DFT reference crystal loading"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>